{template 'common/header'}
<ol class="breadcrumb we7-breadcrumb">
	<a href="{php echo $this->createWebUrl('articlelist',array('module_type'=>'system_welcome'));}"><i class="wi wi-back-circle"></i> </a>
	<li>
		<a href="{php echo $this->createWebUrl('articlelist',array('module_type'=>'system_welcome'));}">文章管理</a>
	</li>
	<li>
		文章列表
	</li>
</ol>
<div class="clearfix">
			<form action="{php echo $this->createWebUrl('articlelist')}" method="get" class="we7-form" role="form">
				<input type="hidden" name="c" value="site">
				<input type="hidden" name="a" value="entry">
				<input type="hidden" name="m" value="{$_GPC['m']}">
				<input type="hidden" name="module_type" value="system_welcome">
				<input type="hidden" name="do" value="articlelist">
				<input type="hidden" name="cat_id" value="{$category['cat_id']}">
				<input type="hidden" name="add_time" value="{$_GPC['add_time']}">
				<div class="form-group">
					<label class="col-sm-2 control-label">新闻分类</label>
					<div class="col-sm-8">
						<div class="btn-group we7-btn-group">
							<a href="{php echo filter_url('cat_id:0','module_type:system_welcome');}" class="btn {if $_GPC['cat_id'] == 0}btn-primary{else}btn-default{/if}">不限</a>
							{loop $categorys $category}
							<a href="{php echo filter_url('cat_id:' . $category['cat_id'],'module_type:system_welcome');}" class="btn {if $_GPC['cat_id'] == $category['cat_id']}btn-primary{else}btn-default{/if}">{$category['cat_name']}</a>
							{/loop}
						</div>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">添加时间</label>
					<div class="col-sm-8">
						<div class="btn-group we7-btn-group">
							<a href="{php echo filter_url('add_time:0','module_type:system_welcome');}" class="btn {if $_GPC['add_time'] == 0}btn-primary{else}btn-default{/if}">不限</a>
							<a href="{php echo filter_url('add_time:3','module_type:system_welcome');}" class="btn {if $_GPC['add_time'] == 3}btn-primary{else}btn-default{/if}">三天内</a>
							<a href="{php echo filter_url('add_time:7','module_type:system_welcome');}" class="btn {if $_GPC['add_time'] == 7}btn-primary{else}btn-default{/if}">一周内</a>
							<a href="{php echo filter_url('add_time:30','module_type:system_welcome');}" class="btn {if $_GPC['add_time'] == 30}btn-primary{else}btn-default{/if}">30天内</a>
							<a href="{php echo filter_url('add_time:90','module_type:system_welcome');}" class="btn {if $_GPC['add_time'] == 90}btn-primary{else}btn-default{/if}">90天内</a>
						</div>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">标题</label>
					<div class="input-group col-sm-4 pull-left">
						<input class="form-control" name="article_title" type="text" value="{$_GPC['article_title']}">
						<div class="input-group-btn">
							<button type='submit' class="btn btn-default"><i class="fa fa-search"></i> </button>
						</div>
					</div>
					<div class="pull-right">
						<a href="{php echo $this->createWebUrl('category',array('module_type'=>'system_welcome'));}" class="btn btn-primary btn-sm">分类管理</a>
						<a href="{php echo $this->createWebUrl('articleedit',array('module_type'=>'system_welcome'));}" class="btn btn-primary btn-sm">添加文章</a>
					</div>
				</div>
			</form>
			<table class="table table-bordered">
				<thead>
		            <tr>
						<th>标题</th>
						<th>所属分类</th>
						<th>排序</th>
						<th>阅读次数</th>
	                    <!--<th>在首页显示</th>-->
	                    <th>是否显示</th>
						<th>添加时间</th>
						<th>操作</th>
					</tr>
		        </thead>
				 <tbody>
			{loop $article_list $index $article}
				<tr>
					<td>
						{$article['article_title']}
					</td>
					<td>{$article['article_cat']}</td>
					<td>
						{$article['article_sort']}
					</td>
					<td>
						{$article['article_clicks']}
					</td>
					<td>
						{if $article['is_show'] == 1}
						<span class="label label-success">是</span>
						{else}
						<span class="label label-danger">否</span>
						{/if}
					</td>
					<td>{$article['add_time']}</td>
					<td>
						<a href="{php echo $this->createWebUrl('articleedit', array('article_id' => $article['article_id'],'module_type'=>'system_welcome'));}" class="label label-success">编辑</a>
						<a href="{php echo $this->createWebUrl('articledel', array('article_id' => $article['article_id'],'module_type'=>'system_welcome'));}" class="label label-danger" onclick="if(!confirm('确定删除吗')) return false;">删除</a>
					</td>
				</tr>
			{/loop}
			</tbody>
		</table>
		<div class="text-right">
			{$pager}
		</div>
	</div>

{template 'common/footer'}
